odoo.define('account.month_end', function (require) {
    "use strict";

    var AbstractField = require('web.AbstractField');
    var core = require('web.core');
    var field_registry = require('web.field_registry');
    var field_utils = require('web.field_utils');

    var QWeb = core.qweb;


    var MonthEndWidget = AbstractField.extend({
        // events: _.extend({
        //     'click .outstanding_credit_assign': '_onOutstandingCreditAssign',
        // }, AbstractField.prototype.events),
        supportedFieldTypes: ['char'],

        //--------------------------------------------------------------------------
        // Public
        //--------------------------------------------------------------------------

        /**
         * @override
         * @returns {boolean}
         */
        isSet: function () {
            return true;
        },

        //--------------------------------------------------------------------------
        // Private
        //--------------------------------------------------------------------------

        /**
         * @private
         * @override
         */
        _render: function () {
            var self = this;
            console.log(this.value)
            var info = false;
            if (this.value) {
                // info = JSON.parse(this.value);
                info = this.value;
                // console.log(info)
            }
            if (!info) {
                this.$el.html('');
                return;
            }
            this.$el.html(info);
            // this.$el.html(QWeb.render('ShowMonthEndInfo', {
            //     lines: info,
            // }));
        },

        //--------------------------------------------------------------------------
        // Handlers
        //--------------------------------------------------------------------------


    });

    field_registry.add('MonthEndInfoWidget', MonthEndWidget);

});
